//
// Created by shrike on 16-9-20.
//

#ifndef BANKQUEUE_EVENT_H
#define BANKQUEUE_EVENT_H

#include "random.h"

enum class EventType : int {
  ARRIVIED,
  DEPARTURE
};

class Event {
 public:
  Event():occur_time(Random::uniform(RANDOM_DURATION)),
          event_type(EventType::ARRIVIED),
          service_index(-1),
          next(nullptr){}

  Event(int occur_time):occur_time(occur_time),
          event_type(EventType::ARRIVIED),
          service_index(-1),
          next(nullptr){}
  
  Event(int occur_time, EventType event_type, int service_index):
          occur_time(occur_time),
          event_type(event_type),
          service_index(service_index),
          next(nullptr) {}
 public:
  int occur_time;
  int service_index;
  EventType event_type;
  Event *next;
};

#endif //BANKQUEUE_EVENT_H
